<!doctype html>
<html lang="en" xmlns:th="http://www.w3.org/1999/xhtml" xmlns:shiro="http://www.w3.org/1999/xhtml">

<head th:fragment="header(title)">
    <meta charset="utf-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title th:text="${title}"></title>
    <meta name="keywords" content="">
    <meta name="description" content="">
    <link rel="shortcut icon" href="favicon.ico">
    <link href="/css/bootstrap.min.css?v=3.3.6" rel="stylesheet">
    <link href="/css/font-awesome.css?v=4.4.0" rel="stylesheet">
    <link href="/css/plugins/bootstrap-table/bootstrap-table.min.css" rel="stylesheet">
    <link href="/css/plugins/bootstrap-table/bootstrap-table-fixed-columns.css" rel="stylesheet">
    <link href="/css/plugins/jsTree/style.min.css" rel="stylesheet">
    <link href="/css/plugins/bootstrap-select/bootstrap-select.css" rel="stylesheet">
    <link href="/css/plugins/jqTreeGrid/jquery.treegrid.css" rel="stylesheet">
    <!--summernote css -->
    <link href="/css/plugins/summernote/summernote-0.8.8.css" rel="stylesheet">
    <link href="/css/animate.css" rel="stylesheet">
    <link href="/css/plugins/chosen/chosen.css" rel="stylesheet">
    <link href="/css/style.css?v=4.1.0" rel="stylesheet">
    <link rel="stylesheet" href="/css/selectpage.css" type="text/css">
    <link rel="stylesheet" href="/js/layui-v2.6.6/layui/css/layui.css">
    <style>
        .bootstrap3 {
            height: calc(100% - 40px);
        }

        .bootstrap3 .fixed-table-container {
            height: calc(100% - 180px);
        }

        .bootstrap3 .fixed-table-pagination {
            height: 50px;
        }

        .fixed-table-toolbar .bs-bars {
            width: 100%;
        }

        .table {
            display: table;
            table-layout: fixed;
        }

        /*position: sticky; !* 设置为粘性定位，使得最后一列在滚动时保持固定 *!*/
        /*right: 0; !* 右侧边距为0，将最后一列固定在右侧 *!*/
    </style>
</head>

<th:block th:fragment="javaScript">

    <script src="/js/jquery.min.js?v=2.1.4"></script>
    <script src="/js/bootstrap.min.js?v=3.3.6"></script>
    <script src="/js/plugins/bootstrap-table/bootstrap-table.min.js"></script>
    <script src="/js/plugins/bootstrap-table/bootstrap-table-mobile.min.js"></script>
    <script src="/js/plugins/bootstrap-table/bootstrap-table-fixed-columns.js"></script>
    <script src="/js/plugins/bootstrap-select/bootstrap-select.js"></script>
    <script src="/js/plugins/bootstrap-table/locale/bootstrap-table-zh-CN.min.js"></script>
    <script src="/js/plugins/validate/jquery.validate.min.js"></script>
    <script src="/js/plugins/validate/jquery.validate.extend.js"></script>
    <script src="/js/plugins/validate/messages_zh.min.js"></script>
    <script src="/js/plugins/jsTree/jstree.min.js"></script>
    <script src="/js/plugins/jqTreeGrid/jquery.treegrid.min.js"></script>
    <script src="/js/plugins/jqTreeGrid/jquery.treegrid.extension.js"></script>
    <script src="/js/plugins/jqTreeGrid/jquery.treegrid.bootstrap3.js"></script>
    <script src="/js/plugins/chosen/chosen.jquery.js"></script>
    <script src="/js/plugins/layer/layer.js"></script>
    <script src="/js/layui-v2.6.6/layui/layui.js"></script>
    <script src="/js/content.js?v=1.0.0"></script>
    <!--summernote-->
    <script src="/js/plugins/summernote/summernote.js"></script>
    <script src="/js/plugins/summernote/summernote-zh-CN.min.js"></script>
    <!--分页下拉框-->
    <script type="text/javascript" src="/js/selectpage.js"></script>
    <script type="text/javascript" src="/js/jquery-form.js"></script>
</th:block>

<body>

<div th:fragment="table(page)">
    <div id="exampleToolbar" style="width: 100%;display: flex;  flex-direction: column; flex-wrap: nowrap;">
        <div>
            <div class="columns pull-left">
                <!--            成绩解密 -->
                <th:block th:if="${page=='制定照护选择二次加密录入分数'}">
                    <button type="button" class="btn  btn-primary"
                            shiro:hasPermission="jzweb:zhiDingOne:entry"
                            onclick="EntryScore()">
                        录入分数
                    </button>
                    <button type="button" class="btn  btn-primary"
                            shiro:hasPermission="jzweb:zhiDingOne:export"
                            onclick="derive()">
                        导出
                    </button>
                </th:block>
                <th:block th:if="${page=='制定照护选导入一次加密号'}">
                    <button type="button" class="btn  btn-primary"
                            shiro:hasPermission="jzweb:zhiDingTwo:import"
                            onclick="EntryScore()">
                        导入
                    </button>
                    <button type="button" class="btn  btn-primary"
                            shiro:hasPermission="jzweb:zhiDingTwo:export"
                            onclick="derive()">
                        导出
                    </button>
                    <button type="button" class="btn  btn-primary"
                            shiro:hasPermission="jzweb:zhiDingTwo:download"
                            onclick="template()">
                        模版下载
                    </button>
                </th:block>
                <th:block th:if="${page=='制定照护选选择一次加密号与二次加密号'}">
                    <button type="button" class="btn  btn-primary"
                            shiro:hasPermission="jzweb:zhiDingThree:import"
                            onclick="EntryScore()">
                        录入
                    </button>
                    <button type="button" class="btn  btn-primary"
                            shiro:hasPermission="jzweb:zhiDingThree:export"
                            onclick="derive()">
                        导出
                    </button>
                </th:block>
                <th:block th:if="${page=='制定照护选根据选手信息选择一次加密号'}">
                    <!--                    <button type="button" class="btn  btn-primary"-->
                    <!--                            onclick="EntryScore()">-->
                    <!--                        录入-->
                    <!--                    </button>-->
                    <button type="button" class="btn  btn-primary"
                            shiro:hasPermission="jzweb:zhiDingFour:export"
                            onclick="derive()">
                        导出
                    </button>
                </th:block>
                <th:block th:if="${page=='实操居家场景导入二次加密信息'}">
                    <button type="button" class="btn  btn-primary"
                            shiro:hasPermission="jzweb:juJiaOne:import"
                            onclick="EntryScore()">
                        导入
                    </button>
                    <button type="button" class="btn  btn-primary"
                            shiro:hasPermission="jzweb:juJiaOne:export"
                            onclick="derive()">
                        导出
                    </button>
                    <button type="button" class="btn  btn-primary"
                            shiro:hasPermission="jzweb:juJiaOne:download"
                            onclick="template()">
                        模版下载
                    </button>
                </th:block>
                <th:block th:if="${page=='实操居家场景选择二次加密录入分数'}">
                    <button type="button" class="btn  btn-primary"
                            shiro:hasPermission="jzweb:juJiaOne:entry"
                            onclick="EntryScore()">
                        录入分数
                    </button>
                    <button type="button" class="btn  btn-primary"
                            shiro:hasPermission="jzweb:juJiaTwo:export"
                            onclick="derive()">
                        导出
                    </button>
                </th:block>
                <th:block th:if="${page=='实操居家场景导入一次加密信息'}">
                    <button type="button" class="btn  btn-primary"
                            shiro:hasPermission="jzweb:juJiaThree:import"
                            onclick="EntryScore()">
                        导入
                    </button>
                    <button type="button" class="btn  btn-primary"
                            shiro:hasPermission="jzweb:juJiaThree:export"
                            onclick="derive()">
                        导出
                    </button>
                </th:block>
                <th:block th:if="${page=='实操居家场景选择一次加密号与二次加密号'}">
                    <button type="button" class="btn  btn-primary"
                            shiro:hasPermission="jzweb:juJiaFour:entry"
                            onclick="EntryScore()">
                        录入
                    </button>
                    <button type="button" class="btn  btn-primary"
                            shiro:hasPermission="jzweb:juJiaFour:export"
                            onclick="derive()">
                        导出
                    </button>
                </th:block>
                <th:block th:if="${page=='实操居家场景根据选手信息选择一次加密'}">
                    <!--                    <button type="button" class="btn  btn-primary"-->
                    <!--                            onclick="EntryScore()">-->
                    <!--                        录入-->
                    <!--                    </button>-->
                    <button type="button" class="btn  btn-primary"
                            shiro:hasPermission="jzweb:juJiaFive:export"
                            onclick="derive()">
                        导出
                    </button>
                </th:block>
                <th:block th:if="${page=='实操月子中心场景导入二次加密信息'}">
                    <button type="button" class="btn  btn-primary"
                            shiro:hasPermission="jzweb:yueZiOne:import"
                            onclick="EntryScore()">
                        导入
                    </button>
                    <button type="button" class="btn  btn-primary"
                            shiro:hasPermission="jzweb:yueZiOne:export"
                            onclick="derive()">
                        导出
                    </button>
                    <button type="button" class="btn  btn-primary"
                            shiro:hasPermission="jzweb:yueZiOne:download"
                            onclick="template()">
                        模版下载
                    </button>
                </th:block>
                <th:block th:if="${page=='实操月子中心场景选择二次加密录入分数'}">
                    <button type="button" class="btn  btn-primary"
                            shiro:hasPermission="jzweb:yueZiTwo:entry"
                            onclick="EntryScore()">
                        录入分数
                    </button>
                    <button type="button" class="btn  btn-primary"
                            shiro:hasPermission="jzweb:yueZiTwo:export"
                            onclick="derive()">
                        导出
                    </button>
                </th:block>
                <th:block th:if="${page=='实操月子中心场景导入一次加密信息'}">
                    <button type="button" class="btn  btn-primary"
                            shiro:hasPermission="jzweb:yueZiThree:import"
                            onclick="EntryScore()">
                        导入
                    </button>
                    <button type="button" class="btn  btn-primary"
                            shiro:hasPermission="jzweb:yueZiThree:export"
                            onclick="derive()">
                        导出
                    </button>
                    <button type="button" class="btn  btn-primary"
                            shiro:hasPermission="jzweb:yueZiThree:download"
                            onclick="template()">
                        模版下载
                    </button>
                </th:block>
                <th:block th:if="${page=='实操月子中心场景选择一次加密号与二次加密号'}">
                    <button type="button" class="btn  btn-primary"
                            shiro:hasPermission="jzweb:yueZiFour:entry"
                            onclick="EntryScore()">
                        录入
                    </button>
                    <button type="button" class="btn  btn-primary"
                            shiro:hasPermission="jzweb:yueZiFour:export"
                            onclick="derive()">
                        导出
                    </button>
                </th:block>
                <th:block th:if="${page=='实操月子中心场景根据选手信息选择一次加密'}">
                    <!--                    <button type="button" class="btn  btn-primary"-->
                    <!--                            onclick="EntryScore()">-->
                    <!--                        录入-->
                    <!--                    </button>-->
                    <button type="button" class="btn  btn-primary"
                            shiro:hasPermission="jzweb:yueZiFive:export"
                            onclick="derive()">
                        导出
                    </button>
                </th:block>
                <th:block th:if="${page=='职业素养测评导入一次加密信息'}">
                    <button type="button" class="btn  btn-primary"
                            shiro:hasPermission="jzweb:zhiYeOne:import"
                            onclick="EntryScore()">
                        导入
                    </button>
                    <button type="button" class="btn  btn-primary"
                            shiro:hasPermission="jzweb:zhiYeOne:export"
                            onclick="derive()">
                        导出
                    </button>
                </th:block>
                <th:block th:if="${page=='职业素养测评选择一次加密号与二次加密号'}">
                    <button type="button" class="btn  btn-primary"
                            shiro:hasPermission="jzweb:zhiYeTwo:entry"
                            onclick="EntryScore()">
                        录入
                    </button>
                    <button type="button" class="btn  btn-primary"
                            shiro:hasPermission="jzweb:zhiYeTwo:export"
                            onclick="derive()">
                        导出
                    </button>
                </th:block>
                <th:block th:if="${page=='职业素养测评根据选手信息选择一次加密'}">
                    <!--                    <button type="button" class="btn  btn-primary"-->
                    <!--                            onclick="EntryScore()">-->
                    <!--                        录入-->
                    <!--                    </button>-->
                    <button type="button" class="btn  btn-primary"
                            shiro:hasPermission="jzweb:zhiYeThree:export"
                            onclick="derive()">
                        导出
                    </button>
                </th:block>
                <th:block th:if="${page=='职业素养测评机考分数'}">
                    <button type="button" class="btn  btn-primary"
                            shiro:hasPermission="jzweb:zhiYe:stuResultsExport"
                            onclick="derive()">
                        导出
                    </button>
                </th:block>
                <th:block th:if="${page=='成绩总解密'}">
                    <button type="button" class="btn  btn-primary"
                            shiro:hasPermission="jzweb:updateStuDecrypt:updateStuDecrypt"
                            onclick="totalScoreDecryption(1)">
                        一键解密
                    </button>
                    <button type="button" class="btn  btn-primary"
                            shiro:hasPermission="jzweb:documentWord:documentWord"
                            onclick="totalScoreDecryption(2)">
                        导出成绩表
                    </button>
                    <button type="button" class="btn  btn-primary"
                            shiro:hasPermission="jzweb:downloadImportStu:downloadImportStu"
                            onclick="totalScoreDecryption(3)">
                        导出成绩公示表
                    </button>
                </th:block>
            </div>

        </div>

    </div>
    <table class="table-bordered" id="exampleTable" data-mobile-responsive="true">
    </table>
    <!--    按钮权限设置-->
    <th:block th:if="${page=='竞赛管理'}">
        <script type="text/javascript" shiro:hasPermission="jzweb:examinationBatch:edit">
            var s_edit_h = '';
        </script>
        <script type="text/javascript" shiro:hasPermission="jzweb:examinationBatch:remove">
            var s_remove_h = '';
        </script>
        <script type="text/javascript" shiro:hasPermission="jzweb:examinationBatch:generateTestPaper">
            var s_resetPwd_h = '';
        </script>
        <script type="text/javascript" shiro:hasPermission="jzweb:examinationBatch:markingPapers">
            var s_marking_h = '';
        </script>
    </th:block>
    <!--            成绩解密 -->
    <script th:inline="javascript" type="text/javascript">
        $(() => {
            load();
        });
        const reLoad = () => {
            $('#exampleTable').bootstrapTable('refresh')
        }

        const setOneAndTwo = async (title, title1, id, value1, value2) => {
            //获取数据
            let myOption = '', myOption1 = '',
                select1 = id ? `<select name="interest" lay-verify="required" lay-filter="aihao" disabled>`
                    : `<select name="interest" lay-verify="required" lay-filter="aihao">`
            const oneAndTwoData = await getOneAndTwo()
            for (let i = 0; i < oneAndTwoData.length; i++) {
                if (oneAndTwoData[i].num1 != '-') {
                    if (id && value1 == oneAndTwoData[i].num1) {
                        myOption += ` <option value="${oneAndTwoData[i].id}" selected>${oneAndTwoData[i].num1}</option>`
                    } else if (oneAndTwoData[i].num1 != null) {
                        myOption += ` <option value="${oneAndTwoData[i].id}">${oneAndTwoData[i].num1}</option>`
                    }
                }
                if (oneAndTwoData[i].num2 != '-') {
                    if (id && value2 == oneAndTwoData[i].num2) {
                        myOption1 += ` <option value="${oneAndTwoData[i].id}" selected>${oneAndTwoData[i].num2}</option>`
                    } else if (oneAndTwoData[i].num2 != null) {
                        myOption1 += ` <option value="${oneAndTwoData[i].id}">${oneAndTwoData[i].num2}</option>`
                    }
                }

            }

            // //回显
            // if(id){
            //     myOption += ` <option value="${id}" selected>${value1}</option>`
            //     myOption1 += `<option value="${id}" selected>${value2}</option>`
            // }
            //一二
            const index = layer.open({
                type: 1,
                area: ['500px', '500px'],
                title: title,
                shade: 0.6,
                shadeClose: false,
                maxmin: true,
                anim: 0,
                content: `
<form class="layui-form layui-form-pane" style="width: 100%;height: 100%;padding: 10px;" id="myForm">

  <div class="layui-form-item">
        <label class="layui-form-label" style="width:auto;border: 0;">${title1}</label>
  </div>
    <div class="layui-form-item">
    <label class="layui-form-label" style="width:auto;border: 0;">一次加密号</label>
    <div class="layui-input-inline" style="width: calc(100% - 140px);">
      ${select1}
        <option value="">请选择一次加密序号</option>
       ${myOption}
      </select>
    </div>
  </div>
    <div class="layui-form-item">
    <label class="layui-form-label" style="width:auto;border: 0;">二次加密号</label>
    <div class="layui-input-inline" style="width: calc(100% - 140px);">
      <select name="interest1" lay-verify="required" lay-filter="aihao">
        <option value="">请选择二次加密序号</option>
       ${myOption1}
      </select>
    </div>
  </div>
  <div class="layui-form-item" style="display: flex;    justify-content: center;">
    <button class="layui-btn" type="button"  lay-submit lay-filter="layedit-code-yes">提交</button>
  </div>
</form>
                `,
                success: (layero, index) => {
                    layui.use(['form'], () => {
                        var form = layui.form;
                        form.render('select');
                        form.on('submit(layedit-code-yes)', (data) => {
                            const mydata = data.field
                            const reqData = {
                                id: mydata.interest
                            }
                            //根据id获取数据
                            oneAndTwoData.forEach(item => {
                                if (item.id == mydata.interest) {
                                    reqData.num1s = item.num1
                                }
                                if (item.id == mydata.interest1) {
                                    reqData.num2s = item.num2
                                }
                            })
                            console.log('提交数据', oneAndTwoData, mydata, reqData)
                            if (id) {
                                if (!reqData.num1s) {
                                    reqData.num1s = value1
                                }
                                if (!reqData.num2s) {
                                    reqData.num2s = value2
                                }
                            }
                            console.log('提交数据', reqData)
                            //修改
                            $.ajax({
                                type: 'post',
                                data: JSON.stringify({
                                    ...reqData,
                                    ...[[${apiData}]]
                                }),
                                contentType: 'application/json',
                                url: [[${apiModification}]],
                                success: function (r) {
                                    if (r.code == 0) {
                                        layer.msg(r.msg);
                                        layer.close(index)
                                        reLoad();
                                    } else {
                                        layer.msg(r.msg);
                                    }
                                }
                            });

                        });
                    })


                }
            });
        }

        const divShake=(layero)=>{
            if(null!=layero&&''!=layero){
                $(layero).addClass('animate__animated animate__fadeIn')
                $(layero).on('animationend', function() {
                    $(this).removeClass('animate__animated animate__fadeIn');
                });
            }
        }
        const setGrade = async (isadd, title, item) => {
            const oneAndTwoData = await getOneAndTwo()
            let myOption = '', title1 = '', title2 = '', formitem = '', oldSelectExist = false,
                mySelect = isadd ? `<select name="num2" lay-verify="required" lay-filter="aihao">` : ` <select name="num2" value="${item.num2}" lay-verify="required" lay-filter="aihao" disabled>`
            for (let i = 0; i < oneAndTwoData.length; i++) {
                if (oneAndTwoData[i].num2s != '-') {
                    if (isadd) {
                        myOption += ` <option value="${oneAndTwoData[i].num2s}">${oneAndTwoData[i].num2s}</option>`
                    } else {
                        if (oneAndTwoData[i].num2s == item.num2 &&null!=item.num2 ) {
                            myOption += ` <option value="${oneAndTwoData[i].num2s}" selected>${oneAndTwoData[i].num2s}</option>`
                            oldSelectExist = true
                        } else {
                            myOption += ` <option value="${oneAndTwoData[i].num2s}">${oneAndTwoData[i].num2s}</option>`
                        }
                    }
                }
            }
            if (!oldSelectExist && null != item && Object.keys(item).length > 0) {
                myOption += ` <option value="${item.num2}" selected>${item.num2}</option>`
            }
            title1 = [[${page}]] == '制定照护选择二次加密录入分数' ? '早期教育发展分析裁判打分' :
                [[${page}]] == '实操居家场景选择二次加密录入分数' ? '裁判打分' :
                    [[${page}]] == '实操月子中心场景选择二次加密录入分数' ? '婴幼儿保健护理裁判打分' : '裁判打分'
            title2 = [[${page}]] == '实操月子中心场景选择二次加密录入分数' ? '婴幼儿急救处理打分' : ''

            formitem = `
                      <div class="layui-form-item">
        <label class="layui-form-label" style="width:auto;border: 0;">${title1}</label>
  </div>
    <div class="layui-form-item" style="display: flex; gap: 10px;">
  <div style="width: 33%;">
     <label class="layui-form-label" style="width:120px;border: 0;text-align: left;">裁判1</label>
        <input type="number" name="moduleOneMarkOne" placeholder="" autocomplete="off"
        onKeypress="return (/[\\d]/.test(String.fromCharCode(event.keyCode)))"
        value="${isadd ? '' : item.score1}"
        class="layui-input" lay-verify="maxValue" min="0" step="1" lay-affix="number">
  </div>
  <div style="width: 33%;">
     <label class="layui-form-label" style="width:120px;border: 0;text-align: left;">裁判2</label>
        <input type="number" name="moduleOneMarkTwo" placeholder="" autocomplete="off"
        onKeypress="return (/[\\d]/.test(String.fromCharCode(event.keyCode)))"
        value="${isadd ? '' : item.score2}"
        class="layui-input" lay-verify="maxValue" min="0" step="1" lay-affix="number">
  </div>
  <div style="width: 33%;">
     <label class="layui-form-label" style="width:120px;border: 0;text-align: left;">裁判3</label>
        <input type="number" name="moduleOneMarkThree" placeholder="" autocomplete="off"
        onKeypress="return (/[\\d]/.test(String.fromCharCode(event.keyCode)))"
        value="${isadd ? '' : item.score3}"
        class="layui-input" lay-verify="maxValue" min="0" step="1" lay-affix="number">
  </div>
  </div>
                      <div class="layui-form-item" style="display: flex; gap: 10px;">
  <div style="width: 33%;">
     <label class="layui-form-label" style="width:120px;border: 0;text-align: left;">裁判4</label>
        <input type="number" name="moduleOneMarkFour" placeholder="" autocomplete="off"
        onKeypress="return (/[\\d]/.test(String.fromCharCode(event.keyCode)))"
        value="${isadd ? '' : item.score4}"
        class="layui-input" lay-verify="maxValue" min="0" step="1" lay-affix="number">
  </div>
  <div style="width: 33%;">
     <label class="layui-form-label" style="width:120px;border: 0;text-align: left;">裁判5</label>
        <input type="number" name="moduleOneMarkFive" placeholder="" autocomplete="off"
        onKeypress="return (/[\\d]/.test(String.fromCharCode(event.keyCode)))"
        value="${isadd ? '' : item.score5}"
        class="layui-input" lay-verify="maxValue" min="0" step="1" lay-affix="number">
  </div>
  </div>
                    `
            if ([[${page}]] == '实操月子中心场景选择二次加密录入分数'||[[${page}]] == '实操居家场景选择二次加密录入分数') {
                formitem += `

                      <div class="layui-form-item">
        <label class="layui-form-label" style="width:auto;border: 0;">${title2}</label>
  </div>
                      <div class="layui-form-item" style="display: flex; gap: 10px;">
  <div style="width: 33%;">
     <label class="layui-form-label" style="width:120px;border: 0;text-align: left;">裁判1</label>
        <input type="number" name="moduleTwoMarkOne" placeholder="" autocomplete="off"
        onKeypress="return (/[\\d]/.test(String.fromCharCode(event.keyCode)))"
        value="${isadd ? '' : item.score1s}"
        class="layui-input" lay-verify="maxValue1" min="0" step="1" lay-affix="number">
  </div>
  <div style="width: 33%;">
     <label class="layui-form-label" style="width:120px;border: 0;text-align: left;">裁判2</label>
        <input type="number" name="moduleTwoMarkTwo" placeholder="" autocomplete="off"
        onKeypress="return (/[\\d]/.test(String.fromCharCode(event.keyCode)))"
        value="${isadd ? '' : item.score2s}"
        class="layui-input" lay-verify="maxValue1" min="0" step="1" lay-affix="number">
  </div>
  <div style="width: 33%;">
     <label class="layui-form-label" style="width:120px;border: 0;text-align: left;">裁判3</label>
        <input type="number" name="moduleTwoMarkThree" placeholder="" autocomplete="off"
        onKeypress="return (/[\\d]/.test(String.fromCharCode(event.keyCode)))"
        value="${isadd ? '' : item.score3s}"
        class="layui-input" lay-verify="maxValue1" min="0" step="1" lay-affix="number">
  </div>
  </div>
                      <div class="layui-form-item" style="display: flex; gap: 10px;">
  <div style="width: 33%;">
     <label class="layui-form-label" style="width:120px;border: 0;text-align: left;">裁判4</label>
        <input type="number" name="moduleTwoMarkFour" placeholder="" autocomplete="off"
        onKeypress="return (/[\\d]/.test(String.fromCharCode(event.keyCode)))"
        value="${isadd ? '' : item.score4s}"
        class="layui-input" lay-verify="maxValue1" min="0" step="1" lay-affix="number">
  </div>
  <div style="width: 33%;">
     <label class="layui-form-label" style="width:120px;border: 0;text-align: left;">裁判5</label>
        <input type="number" name="moduleTwoMarkFive" placeholder="" autocomplete="off"
        onKeypress="return (/[\\d]/.test(String.fromCharCode(event.keyCode)))"
        value="${isadd ? '' : item.score5s}"
        class="layui-input" lay-verify="maxValue1" min="0" step="1" lay-affix="number">
  </div>
  </div>
                        `
            }
            formitem += `
                                      <div class="layui-form-item">
        <label class="layui-form-label" style="width:auto;border: 0;">备注</label>
         <div class="layui-input-block">
      <input type="text" name="remark" lay-verify="required" placeholder="请输入" autocomplete="off" value="${isadd ? '' : item.remarkA}" class="layui-input">
    </div>
  </div>
                        `
            //分数
            const index = layer.open({
                type: 1,
                area: ([[${page}]] == '实操月子中心场景选择二次加密录入分数' || [[${page}]] == '实操居家场景选择二次加密录入分数')? ['500px', '700px'] : ['500px', '500px'],
                title: title,
                shade: 0.6,
                shadeClose: false,
                maxmin: true,
                anim: 0,
                content: `
<form class="layui-form layui-form-pane" style="width: 100%;height: 100%;padding: 10px;" id="myForm">
    <div class="layui-form-item">
    <label class="layui-form-label" style="width:auto;border: 0;">二次加密号</label>
    <div class="layui-input-inline" style="width: calc(100% - 140px);">
       ${mySelect}
        <option value="">请选择二次加密序号</option>
       ${myOption}
      </select>
    </div>
  </div>
 ${formitem}
  <div class="layui-form-item" style="display: flex;    justify-content: center;">
    <button class="layui-btn" type="button"  lay-submit lay-filter="layedit-code-yes">提交</button>
  </div>
</form>
                `,
                success: (layero, index) => {
                    layui.use(['form'], () => {
                        var form = layui.form;
                        // layer.msg('请填写所有必填字段', {icon: 5})
                        form.verify({
                            maxValue: (value, item) => {
                                if (value === '') {
                                    return '必填项不能为空';
                                }
                                if (parseInt(value) > [[${maxValue}]]) {
                                    return '请勿超过' + [[${maxValue}]] + '分';
                                }
                            }
                        });
                        form.render('select');
                        form.render();
                        form.on('submit(layedit-code-yes)', function (data) {
                            const mydata = data.field
                            //第一次确认
                            if ('提交' == $(data.elem).text()) {
                                $(data.elem).text('确认数据')
                                divShake(layero)
                                for (let i = 0; i < data.form.length - 1; i++) {
                                    let element = data.form[i]
                                    $(element).prop('disabled', true)
                                }
                            } else {
                                console.log('提交数据', data, mydata)
                                let otherData = {}
                                if (isadd) {
                                    otherData = {
                                        status: 0
                                    }
                                } else {
                                    otherData = {
                                        status: 0,
                                        id: item.id
                                    }
                                }
                                $.ajax({
                                    type: 'post',
                                    data: JSON.stringify({
                                        ...mydata,
                                        ...[[${apiData}]],
                                        ...otherData,

                                    }),
                                    contentType: 'application/json',
                                    url: [[${apiSeve}]],
                                    success: function (r) {
                                        if (r.code == 0) {
                                            layer.msg(r.msg);
                                            reLoad()
                                            //逻辑处理
                                            for (let i = 0; i < data.form.length - 1; i++) {
                                                let element = data.form[i]
                                                $(element).prop('disabled', false)
                                                const OP = $(element).find("option")
                                                if (OP.length > 0) {
                                                    //下一步
                                                    let mj = '';
                                                    for (let j = 0; j < OP.length; j++) {
                                                        const OPItem = OP[j]
                                                        if ($(element).val() == $(OPItem).val()) {
                                                            mj = j + 1;
                                                        }
                                                    }
                                                    isEnd = mj == OP.length;
                                                    //设置禁止选择
                                                    $(element)[0].options[mj - 1].disabled = true;
                                                    $(element).prop('value', $(OP[mj]).val())
                                                    form.render('select');

                                                } else {
                                                    $(element).val("")
                                                }
                                            }
                                            $(data.elem).text('提交')
                                            divShake(layero)
                                            form.render();
                                            layer.msg(r.msg);
                                            if (isEnd || !isadd) {
                                                layer.close(index);
                                            }
                                        } else {
                                            layer.msg(r.msg);
                                        }
                                    }
                                });


                            }

                        });
                    })


                }
            });
        }
        const getOneAndTwo = () => {
            return new Promise((resolve, reject) => {
                let pData = {
                    current: 1,
                    size: 10000,
                    ...[[${apiData}]]
                }
                $.ajax({
                    type: [[${apiSelectMethod}]],
                    data: [[${apiSelectMethod}]] == 'post' ? JSON.stringify(pData) : pData,
                    contentType: 'application/json',
                    url: [[${apiSelect}]],
                    success: function (r) {
                        if (r.code == 0) {
                            resolve([[${apiSelectMethod}]] == 'post' ? r.data.records : r.data)
                        } else {
                            layer.msg(r.msg);
                            reject(r)
                        }
                    }
                });
            })
        }
        const getTwo = () => {
            return new Promise((resolve, reject) => {
                $.ajax({
                    type: 'get',
                    data: {
                        ...[[${apiData}]]
                    },
                    contentType: 'application/json',
                    url: [[${apiLead1}]],
                    success: function (r) {
                        if (r.code == 0) {
                            resolve(r.data)
                        } else {
                            layer.msg(r.msg);
                            reject(r)
                        }
                    }
                });
            })
        }
        const EntryScore = async (item = null) => {
            console.log('=====>>录入分数>', item)
            let title = [[${page}]], title1 = '早期教育发展分析裁判打分', title2 = '婴幼儿急救处理打分', index,
                myOption = '', myOption1 = '', formitem = '', isEnd = false

            switch ([[${page}]]) {
                case '制定照护选择二次加密录入分数':
                case '实操居家场景选择二次加密录入分数':
                case '实操月子中心场景选择二次加密录入分数':
                    setGrade(true, title, '')
                    break;
                case '制定照护选导入一次加密号':
                case '实操居家场景导入二次加密信息':
                case '实操居家场景导入一次加密信息':
                case '实操月子中心场景导入二次加密信息':
                case '实操月子中心场景导入一次加密信息':
                case '职业素养测评导入一次加密信息':
                    title = ([[${page}]] == '实操月子中心场景导入二次加密信息'
                        || [[${page}]] == '实操居家场景导入二次加密信息') ? '导入二次加密' : '导入一次加密';
                    //文件
                    index = layer.open({
                        type: 1,
                        area: ['500px', '500px'],
                        title: title,
                        shade: 0.6,
                        shadeClose: false,
                        maxmin: true,
                        anim: 0,
                        content: `
<form class="layui-form layui-form-pane" style="width: 100%;height: 100%;padding: 10px;" id="myForm">
    <div class="layui-form-item">
    <label class="layui-form-label" style="width:auto;border: 0;">上传加密信息</label>
    </div>
    <div class="layui-form-item" style="height: calc(100% - 150px);">
<div class="layui-upload-drag" style=" height: 100%; display: flex; justify-content: center;  align-items: center;
flex-direction: column;" id="ID-upload-demo-drag">
  <i class="layui-icon layui-icon-upload"></i>
  <div class="layui-icon-upload-title">点击上传，或将文件拖拽到此处</div>
  <div class="layui-hide" id="ID-upload-demo-preview">
     上传文件
     <input type="text" name="name" placeholder="" autocomplete="off" disabled>
  </div>
</div>
  </div>
  <div class="layui-form-item" style="display: flex;    justify-content: center;">
    <button class="layui-btn" type="button"  lay-submit lay-filter="layedit-code-yes">提交</button>
  </div>
</form>
                `,
                        success: function (layero, index) {
                            layui.use(['form', 'upload'], async function () {
                                var form = layui.form;
                                var upload = layui.upload;
                                //虚拟先生成二次加密
                                if('制定照护选导入一次加密号'==[[${page}]]||'职业素养测评导入一次加密信息'==[[${page}]]) {
                                    await getTwo()
                                }
                                //上传
                                upload.render({
                                    elem: '#ID-upload-demo-drag',
                                    url: [[${apiLead}]],
                                    data: [[${apiLeadData}]],
                                    exts: 'xls',
                                    done: function (res) {
                                        console.log(res)
                                        if (res.code != "0") {
                                            layer.msg(res.msg)
                                        } else {
                                            $('#ID-upload-demo-preview').removeClass('layui-hide')
                                                .find('input').attr('value', 'res.files.file');
                                            $('.layui-icon-upload').hide()
                                            $('.layui-icon-upload-title').hide()
                                            layer.msg('上传成功');
                                            layer.close(index)
                                            reLoad()
                                        }
                                    }
                                });

                                form.on('submit(layedit-code-yes)', function (data) {
                                    const mydata = data.field
                                    console.log('提交数据', mydata.name, mydata)


                                    //关闭
                                    layer.close(index);
                                });
                            })


                        }
                    });
                    break;
                case '制定照护选选择一次加密号与二次加密号':
                case '实操居家场景选择一次加密号与二次加密号':
                case '实操月子中心场景选择一次加密号与二次加密号':
                case '职业素养测评选择一次加密号与二次加密号':
                    title1 = '请仔细核对信息'
                    title = '信息录入'
                    setOneAndTwo(title, title1, '', '', '')
                    break;
                case '制定照护选根据选手信息选择一次加密号':
                case '实操居家场景根据选手信息选择一次加密':
                case '实操月子中心场景根据选手信息选择一次加密':
                case '职业素养测评根据选手信息选择一次加密':
                    title1 = '请仔细核对信息'
                    title = '信息录入'
                    const oneAndTwoData = await getOneAndTwo()
                    for (let i = 0; i < oneAndTwoData.length; i++) {
                        if (oneAndTwoData[i].num1s != '-') {
                            myOption += ` <option value="${oneAndTwoData[i].num1s}">${oneAndTwoData[i].num1s}</option>`
                        }
                    }
                    let oldmyOption1 = myOption, oldmyOption2 = myOption, oldmyOption3 = myOption
                    for (let i = 0; i < ([[${page}]] == '制定照护选根据选手信息选择一次加密号' ? 2 : 1); i++) {
                        if (i == 0 && null != item && item.isEdit && item.num1) {
                            oldmyOption1 += ` <option value="${item.num1}" selected>${item.num1}</option>`
                        }
                        if (i == 0 && null != item && item.isEdit && item.oneNum1) {
                            oldmyOption1 += ` <option value="${item.oneNum1}" selected>${item.oneNum1}</option>`
                        }
                        if (i == 1 && null != item && item.isEdit && item.twoNum1) {
                            oldmyOption2 += ` <option value="${item.twoNum1}" selected>${item.twoNum1}</option>`
                        }
                        if (i == 2 && null != item && item.isEdit && item.threeNum1) {
                            oldmyOption3 += ` <option value="${item.threeNum1}" selected>${item.threeNum1}</option>`

                        }

                        formitem += `
                      <div class="layui-form-item">
                            <label class="layui-form-label" style="width:auto;border: 0;">选手姓名</label>
                            <div class="layui-input-block">
<!--                            id-->
                                <input style="    display: none;" value="${[[${page}]] == '制定照护选根据选手信息选择一次加密号' ? (
                            i == 0 ? (item?.oneId == null ? '' : item.oneId) : i == 1 ? (item?.twoId == null ? '' : item.twoId) : '') : (item?.id)}"
                                name="${[[${page}]] == '制定照护选根据选手信息选择一次加密号' ? (i == 0 ? 'oneId' : i == 1 ? 'twoId' : '') : 'id'}">
<!-- 名字-->
                                <input type="text" value="${[[${page}]] == '制定照护选根据选手信息选择一次加密号' ? (
                            i == 0 ? (item?.nameOne == null ? '' : item.nameOne) : i == 1 ? (item?.nameTwo == null ? '' : item.nameTwo) : (item?.nameThree == null ? '' : item.nameThree)
                        ) : (item?.name)}" disabled   name="${[[${page}]] == '制定照护选根据选手信息选择一次加密号' ? (
                            i == 0 ? 'nameOne' : i == 1 ? 'nameTwo' : 'nameThree'
                        ) : 'name'}"  placeholder="请输入" autoComplete="off" class="layui-input">

                            </div>
                            <div class="layui-input-inline" style="width: calc(100% - 111px); margin-left: 23px;  margin-right: 1px;">
                                <select name="num1s${[[${page}]] == '制定照护选根据选手信息选择一次加密号' ? i : ''}" id="select${i}" lay-filter="selectfilter${i}">
                                    <option value="">请选择一次加密序号</option>
                                    ${i == 0 ? oldmyOption1 : i == 1 ? oldmyOption2 : oldmyOption3}
                                </select>
                            </div>
                        </div>`
                    }
                    console.log('=item.threeNum1=', oldmyOption1, oldmyOption2, oldmyOption3)

                    //姓名
                    index = layer.open({
                        type: 1,
                        area: ['500px', '600px'],
                        title: title,
                        shade: 0.6,
                        shadeClose: false,
                        maxmin: true,
                        anim: 0,
                        content: `
<form class="layui-form layui-form-pane" style="width: 100%;height: 100%;padding: 10px;" id="myForm">

  <div class="layui-form-item">
        <label class="layui-form-label" style="width:auto;border: 0;">${title1}</label>
  </div>
   <div class="layui-form-item">
    <label class="layui-form-label" style="width:auto;border: 0;">检录序号</label>
     <div class="layui-input-block">
      <input type="text" name="recordNumber" value="${(null != item && item.recordNumber) ? item.recordNumber : '12'}" disabled lay-verify="required" placeholder="请输入" autocomplete="off" class="layui-input">
    </div>
  </div>
   <div class="layui-form-item">
    <label class="layui-form-label" style="width:auto;border: 0;">参赛单位</label>
     <div class="layui-input-block">
      <input type="text" name="unitName" value="${item?.unitName}" disabled  lay-verify="required" placeholder="请输入" autocomplete="off" class="layui-input">
    </div>
  </div>
   ${formitem}
  <div class="layui-form-item" style="display: flex;    justify-content: center;">
    <button class="layui-btn" type="button"  lay-submit lay-filter="layedit-code-yes">提交</button>
  </div>
</form>
                `,
                        success: (layero, index) => {
                            layui.use(['form'], () => {
                                var form = layui.form;
                                form.render('select');
                                if ([[${page}]] == '制定照护选根据选手信息选择一次加密号') {
                                    //获取所有select监听
                                    form.on('select(selectfilter0)', (thisData) => {
                                        //获取其他select
                                        for (let i = 0; i < $("#select1")[0].options.length; i++) {
                                            if (thisData.value == $("#select1")[0].options[i].value) {
                                                $("#select1")[0].options[i].disabled = true;
                                            } else {
                                                $("#select1")[0].options[i].disabled = false;
                                            }
                                        }
                                        form.render('select');
                                    });
                                    form.on('select(selectfilter1)', (thisData) => {
                                        //获取其他select
                                        for (let i = 0; i < $("#select0")[0].options.length; i++) {
                                            if (thisData.value == $("#select0")[0].options[i].value) {
                                                $("#select0")[0].options[i].disabled = true;
                                            } else {
                                                $("#select0")[0].options[i].disabled = false;
                                            }
                                        }
                                        form.render('select');
                                    });


                                }

                                form.on('submit(layedit-code-yes)', async (data) => {
                                    const mydata = data.field
                                    console.log('提交数据', mydata, item)
                                    //导入
                                    if ([[${page}]] == '制定照护选根据选手信息选择一次加密号') {
                                        let rqnumber = 0, existnumber = 0

                                        if (typeof mydata.oneId != null && mydata.oneId !== '') {
                                            existnumber++;
                                            await $.ajax({
                                                type: 'get',
                                                data: {
                                                    ...[[${apiLeadData}]],
                                                    num1s: mydata.num1s0,
                                                    id: mydata.oneId
                                                },
                                                contentType: 'application/json',
                                                url: (item.isEdit || item.oneNum1) ? [[${apiModification}]] : [[${apiLead}]],
                                                success: function (r) {
                                                    if (r.code == 0) {
                                                        rqnumber++;
                                                    }
                                                }
                                            });
                                        }
                                        if (typeof mydata.twoId != null && mydata.twoId !== '') {
                                            existnumber++;
                                            await $.ajax({
                                                type: 'get',
                                                data: {
                                                    ...[[${apiLeadData}]],
                                                    num1s: mydata.num1s1,
                                                    id: mydata.twoId
                                                },
                                                contentType: 'application/json',
                                                url: (item.isEdit || item.twoNum1) ? [[${apiModification}]] : [[${apiLead}]],
                                                success: function (r) {
                                                    if (r.code == 0) {
                                                        rqnumber++;
                                                    }
                                                }
                                            });
                                        }
                                        if (existnumber == rqnumber) {
                                            layer.msg("成功")
                                        } else {
                                            layer.msg("失败" + (existnumber - rqnumber))
                                        }
                                        layer.close(index)
                                        reLoad();
                                    } else {
                                        $.ajax({
                                            type: 'get',
                                            data: {
                                                ...[[${apiLeadData}]],
                                                ...mydata,
                                                id: item.id
                                            },
                                            contentType: 'application/json',
                                            url: item.isEdit ? [[${apiModification}]] : [[${apiLead}]],
                                            success: function (r) {
                                                if (r.code == 0) {
                                                    layer.msg(r.msg);
                                                    layer.close(index)
                                                    reLoad();
                                                } else {
                                                    layer.msg(r.msg);
                                                }
                                            }
                                        });
                                    }


                                });
                            })


                        }
                    });
                    break;
            }


        }

        const deriveData = () => {
            let data = "?", map = [[${apiDeriveData}]]
            const mapKey = Object.keys(map)
            mapKey.forEach(item => {
                data += `${item}=${map[item]}&`
            })
            return data.substring(0, data.length - 1);
        }

        const derive = () => {
            console.log('=====>>导出>', deriveData())
            //apiDerive
            layer.confirm(`您确定要导出${[[${page}]]}信息吗？`, {
                btn1: function (index) {
                    window.location.href = [[${apiDerive}]] + deriveData();
                    layer.close(index)
                }
            });
        }
        const template = () => {
            console.log("模板下载")
            window.location.href = [[${apiTemplate}]]
        }
        const edit = (mydata) => {
            console.log('=====>>修改>', mydata)
            if ([[${page}]] == '实操居家场景选择一次加密号与二次加密号'
                || [[${page}]] == '实操月子中心场景选择一次加密号与二次加密号'
                || [[${page}]] == '职业素养测评选择一次加密号与二次加密号'
                || [[${page}]] == '制定照护选选择一次加密号与二次加密号') {
                setOneAndTwo('信息录入', '请仔细核对信息', mydata.id, mydata.num1s, mydata.num2s)
            } else if ([[${page}]] == '实操居家场景选择二次加密录入分数'
                || [[${page}]] == '实操月子中心场景选择二次加密录入分数'
                || [[${page}]] == '制定照护选择二次加密录入分数') {
                setGrade(false, [[${page}]], mydata)
            } else if ([[${page}]] == '实操居家场景根据选手信息选择一次加密'
                || [[${page}]] == '实操月子中心场景根据选手信息选择一次加密'
                || [[${page}]] == '职业素养测评根据选手信息选择一次加密'
                || [[${page}]] == '制定照护选根据选手信息选择一次加密号') {
                mydata.isEdit = true
                EntryScore(mydata)
            } else {
                let index = layer.open({
                    type: 1,
                    area: ['500px', '200px'],
                    title: "修改",
                    shade: 0.6,
                    shadeClose: false,
                    maxmin: true,
                    anim: 0,
                    content: `
<form class="layui-form layui-form-pane" style="width: 100%;height: 100%;padding: 10px;" id="myForm">
   <div class="layui-form-item">
    <label class="layui-form-label" style="width:auto;border: 0;">${[[${page}]] == '实操居家场景导入二次加密信息' ? '二次加密号' : '一次加密号'}</label>
     <div class="layui-input-block">
      <input type="text" name="${[[${page}]] == '实操居家场景导入二次加密信息' ? 'num2' : 'num1'}" value="${[[${page}]] == '实操居家场景导入二次加密信息' ? (mydata.num2 == null ? '' : mydata.num2) :(mydata.num1 == null ? '' : mydata.num1)}" lay-verify="required" placeholder="请输入" autocomplete="off" class="layui-input">
    </div>
  </div>
  <div class="layui-form-item" style="display: flex;    justify-content: center;">
    <button class="layui-btn" type="button"  lay-submit lay-filter="layedit-code-yes">提交</button>
  </div>
</form>
                `,
                    success: (layero, index) => {
                        layui.use(['form'], () => {
                            var form = layui.form;
                            form.render('select');
                            form.on('submit(layedit-code-yes)', (data) => {
                                console.log('提交数据', data.field, mydata)
                                // 补充替换实体
                                for (var key in data.field) {
                                    if (mydata.hasOwnProperty(key)) {
                                        mydata[key] = data.field[key];
                                    }
                                }
                                console.log('提交数据', mydata)

                                //修改
                                $.ajax({
                                    type: 'post',
                                    data: JSON.stringify({
                                        ...mydata
                                    }),
                                    contentType: 'application/json',
                                    url: [[${apiModification}]],
                                    success: function (r) {
                                        if (r.code == 0) {
                                            layer.msg(r.msg);
                                            layer.close(index)
                                            reLoad();
                                        } else {
                                            layer.msg(r.msg);
                                        }
                                    }
                                });


                            });
                        })


                    }
                });
            }


        }

        const remove = (id) => {
            layer.confirm("确认要删除选中的'" + id + "'条数据吗?", {
                btn: ['确定', '取消']
                // 按钮
            }, () => {
                console.log('=====>>删除>', id)
                $.ajax({
                    type: 'get',
                    data: {
                        id
                    },
                    url: [[${apiDelted}]],
                    success: function (r) {
                        if (r.code == 0) {
                            layer.msg(r.msg);
                            reLoad();
                        } else {
                            layer.msg(r.msg);
                        }
                    }
                });
            });

        }

        const totalScoreDecryption = (index) => {
            switch (index) {
                case 1:
                    console.log('一键解密')
                    let formitem='';
                    for (let i = 1; i < 3; i++) {
                        formitem += `
                      <div class="layui-form-item">
                            <label class="layui-form-label" style="width:auto;border: 0;">${i==1?'裁判长':'仲裁长'}</label>
                            <div class="layui-input-block">
                                <input type="text"   name="username${i==1?'':i}"  placeholder="请输入账号" autoComplete="off" class="layui-input">
                            </div>
                            <div class="layui-input-inline" style="width: calc(100% - 111px); margin-left: 38px;margin-top: 10px;  margin-right: 1px;">
                                 <input type="password"   name="password${i==1?'':i}"  placeholder="请输入密码" autoComplete="off" class="layui-input">
                            </div>
                        </div>`
                    }
                   layer.open({
                        type: 1,
                        area: ['500px', '400px'],
                        title: "成绩总解密",
                        shade: 0.6,
                        shadeClose: false,
                        maxmin: true,
                        anim: 0,
                        content: `
<form class="layui-form layui-form-pane" style="width: 100%;height: 100%;padding: 10px;" id="myForm">
    ${formitem}
  <div class="layui-form-item" style="display: flex;    justify-content: center;">
    <button class="layui-btn" type="button"  lay-submit lay-filter="layedit-code-yes">提交</button>
  </div>
</form>
                `,
                        success: (layero, index) => {
                            layui.use(['form'], () => {
                                var form = layui.form;
                                form.render('select');
                                form.render();
                                form.on('submit(layedit-code-yes)', function (data) {
                                    const mydata = data.field
                                            console.log('==确定====',mydata)
                                        $.ajax({
                                            type: 'get',
                                            data:  {
                                                ...mydata,
                                            },
                                            contentType: 'application/json',
                                            url: [[${apiSeve}]],
                                            success: function (r) {
                                                if (r.code == 0) {
                                                    layer.msg(r.msg);
                                                    reLoad()
                                                    layer.close(index);
                                                } else {
                                                    layer.msg(r.msg);
                                                }
                                            }
                                        });

                                });
                            })
                        }
                    });
                    break;
                case 2:
                    console.log('导出成绩表')
                    layer.confirm(`您确定要导出成绩表吗？`, {
                        btn1: function (index) {
                            window.location.href = [[${apiDerive1}]] ;
                            layer.close(index)
                        }
                    });
                    break;
                case 3:
                    console.log('导出成绩公示表')
                    layer.confirm(`您确定要导出成绩公示表吗？`, {
                        btn1: function (index) {
                            window.location.href = [[${apiDerive2}]];
                            layer.close(index)
                        }
                    });
                    break;
            }
        }
        const columns = ([[${page}]] == '制定照护选择二次加密录入分数') ?
            [
                {
                    field: 'num2',
                    title: '二次加密号',
                    width: '105px'
                },
                {
                    field: 'score1',
                    title: '裁判一',
                    width: '105px'
                },
                {
                    field: 'score2',
                    title: '裁判二',
                    width: '105px'
                },
                {
                    field: 'score3',
                    title: '裁判三',
                    width: '105px'
                },
                {
                    field: 'score4',
                    title: '裁判四',
                    width: '105px'
                },
                {
                    field: 'score5',
                    title: '裁判五',
                    width: '105px'
                },
                {
                    field: 'remarkA',
                    title: '备注',
                    width: '105px'
                },
                {
                    title: '操作',
                    field: 'id',
                    align: 'center',
                    // width:'50px',
                    formatter: function (value, row, index) {
                        return `
                                    <a style="color: #18a689" class=" " href="#" mce_href="#" title="修改" onclick="edit(${JSON.stringify(row).replace(/\"/g, "'")})">修改</a>
                                    `;
                    },
                    width: '230px'
                }] :
            (
                ([[${page}]] == '制定照护选导入一次加密号') ?
                    [
                        {
                            field: 'num1',
                            title: '一次加密号',
                            width: '105px'
                        },
                        {
                            title: '操作',
                            field: 'id',
                            align: 'center',
                            // width:'50px',
                            formatter: function (value, row, index) {
                                return `          <a style="color: #18a689" class=" " href="#" mce_href="#" title="修改" onclick="edit(${JSON.stringify(row).replace(/\"/g, "'")})">修改</a>
                                     <a style="color: red" class=" " href="#" mce_href="#" title="删除" onclick="remove('${row.id}')">删除</a>
                                    `;
                            },
                            width: '230px'
                        }
                    ] :
                    (
                        ([[${page}]] == '制定照护选选择一次加密号与二次加密号') ?
                            [
                                {
                                    field: 'num1s',
                                    title: '一次加密号',
                                    width: '105px'
                                },
                                {
                                    field: 'num2s',
                                    title: '二次加密号',
                                    width: '105px'
                                },
                                {
                                    title: '操作',
                                    field: 'id',
                                    align: 'center',
                                    // width:'50px',
                                    formatter: function (value, row, index) {
                                        return `          <a style="color: #18a689" class=" " href="#" mce_href="#" title="修改" onclick="edit(${JSON.stringify(row).replace(/\"/g, "'")})">修改</a>
                                    `;
                                    },
                                    width: '230px'
                                }
                            ] :
                            (
                                ([[${page}]] == '制定照护选根据选手信息选择一次加密号') ?
                                    [
                                        {
                                            field: 'recordNumber',
                                            title: '检录序号',
                                            width: '105px'
                                        },
                                        {
                                            field: 'unitName',
                                            title: '参赛单位',
                                            width: '105px'
                                        },
                                        {
                                            field: 'nameOne',
                                            title: '选手姓名',
                                            width: '105px'
                                        },
                                        {
                                            field: 'oneNum1',
                                            title: '一次加密号',
                                            width: '105px'
                                        },
                                        {
                                            field: 'nameTwo',
                                            title: '选手姓名',
                                            width: '105px'
                                        },
                                        {
                                            field: 'twoNum1',
                                            title: '一次加密号',
                                            width: '105px'
                                        },
                                        {
                                            title: '操作',
                                            field: 'id',
                                            align: 'center',
                                            // width:'50px',
                                            formatter: function (value, row, index) {
                                                return (row.oneNum1 == null && row.twoNum1 == null && row.threeNum1 == null) ? ` <a style="color: #18a689" class=" " href="#" mce_href="#" title="录入" onclick="EntryScore(${JSON.stringify(row).replace(/\"/g, "'")})">录入</a>` :
                                                    `<a style="color: #18a689" class=" " href="#" mce_href="#" title="修改" onclick="edit(${JSON.stringify(row).replace(/\"/g, "'")})">修改</a>`;
                                            },
                                            width: '230px'
                                        }
                                    ] :
                                    (

                                        ([[${page}]] == '实操居家场景导入二次加密信息') ?
                                            [
                                                {
                                                    field: 'num2',
                                                    title: '二次加密号',
                                                    width: '105px'
                                                },
                                                {
                                                    title: '操作',
                                                    field: 'id',
                                                    align: 'center',
                                                    // width:'50px',
                                                    formatter: function (value, row, index) {
                                                        return `          <a style="color: #18a689" class=" " href="#" mce_href="#" title="修改" onclick="edit(${JSON.stringify(row).replace(/\"/g, "'")})">修改</a>
                                                                          <a style="color: red" class=" " href="#" mce_href="#" title="删除" onclick="remove('${row.id}')">删除</a>`;
                                                    },
                                                    width: '230px'
                                                }

                                            ] :
                                            (
                                                ([[${page}]] == '实操居家场景选择二次加密录入分数') ?
                                                    [
                                                        {
                                                            field: 'num2',
                                                            title: '二次加密号',
                                                            width: '105px'
                                                        },
                                                        {
                                                            field: 'score1',
                                                            title: '婴幼儿照护裁判一',
                                                            width: '180px'
                                                        },
                                                        {
                                                            field: 'score2',
                                                            title: '婴幼儿照护裁判二',
                                                            width: '180px'
                                                        },
                                                        {
                                                            field: 'score3',
                                                            title: '婴幼儿照护裁判三',
                                                            width: '180px'
                                                        },
                                                        {
                                                            field: 'score4',
                                                            title: '婴幼儿照护裁判四',
                                                            width: '180px'
                                                        },
                                                        {
                                                            field: 'score5',
                                                            title: '婴幼儿照护裁判五',
                                                            width: '180px'
                                                        },
                                                        {
                                                            field: 'score1s',
                                                            title: '产妇照护裁判一',
                                                            width: '180px'
                                                        },
                                                        {
                                                            field: 'score2s',
                                                            title: '产妇照护裁判二',
                                                            width: '180px'
                                                        },
                                                        {
                                                            field: 'score3s',
                                                            title: '产妇照护裁判三',
                                                            width: '180px'
                                                        },
                                                        {
                                                            field: 'score4s',
                                                            title: '产妇照护裁判四',
                                                            width: '180px'
                                                        },
                                                        {
                                                            field: 'score5s',
                                                            title: '产妇照护裁判五',
                                                            width: '180px'
                                                        },
                                                        {
                                                            field: 'remarkA',
                                                            title: '备注',
                                                            width: '105px'
                                                        },
                                                        {
                                                            field: 'remarkA',
                                                            title: '备注',
                                                            width: '105px'
                                                        },
                                                        {
                                                            title: '操作',
                                                            field: 'id',
                                                            align: 'center',
                                                            // width:'50px',
                                                            formatter: function (value, row, index) {
                                                                return `
                                    <a style="color: #18a689" class=" " href="#" mce_href="#" title="修改" onclick="edit(${JSON.stringify(row).replace(/\"/g, "'")})">修改</a>
                                    `;
                                                            },
                                                            width: '230px'
                                                        }] :
                                                    (
                                                        ([[${page}]] == '实操居家场景导入一次加密信息') ?
                                                            [
                                                                {
                                                                    field: 'num1',
                                                                    title: '一次加密号',
                                                                    width: '105px'
                                                                },
                                                                {
                                                                    title: '操作',
                                                                    field: 'id',
                                                                    align: 'center',
                                                                    // width:'50px',
                                                                    formatter: function (value, row, index) {
                                                                        return `          <a style="color: #18a689" class=" " href="#" mce_href="#" title="修改" onclick="edit(${JSON.stringify(row).replace(/\"/g, "'")})">修改</a>
                                                                          <a style="color: red" class=" " href="#" mce_href="#" title="删除" onclick="remove('${row.id}')">删除</a>`;
                                                                    },
                                                                    width: '230px'
                                                                }

                                                            ] :
                                                            (
                                                                ([[${page}]] == '实操居家场景选择一次加密号与二次加密号') ?
                                                                    [
                                                                        {
                                                                            field: 'num1s',
                                                                            title: '一次加密号',
                                                                            width: '105px'
                                                                        },
                                                                        {
                                                                            field: 'num2s',
                                                                            title: '二次加密号',
                                                                            width: '105px'
                                                                        },
                                                                        {
                                                                            title: '操作',
                                                                            field: 'id',
                                                                            align: 'center',
                                                                            // width:'50px',
                                                                            formatter: function (value, row, index) {
                                                                                return `          <a style="color: #18a689" class=" " href="#" mce_href="#" title="修改" onclick="edit(${JSON.stringify(row).replace(/\"/g, "'")})">修改</a>
                                                                           `;
                                                                            },
                                                                            width: '230px'
                                                                        }

                                                                    ] :
                                                                    (
                                                                        ([[${page}]] == '实操居家场景根据选手信息选择一次加密') ?
                                                                            [
                                                                                {
                                                                                    field: 'recordNumber',
                                                                                    title: '检录序号',
                                                                                    width: '105px'
                                                                                },
                                                                                {
                                                                                    field: 'unitName',
                                                                                    title: '参赛单位',
                                                                                    width: '105px'
                                                                                },
                                                                                {
                                                                                    field: 'name',
                                                                                    title: '选手姓名',
                                                                                    width: '105px'
                                                                                },
                                                                                {
                                                                                    field: 'num1',
                                                                                    title: '一次加密号',
                                                                                    width: '105px'
                                                                                },
                                                                                {
                                                                                    title: '操作',
                                                                                    field: 'id',
                                                                                    align: 'center',
                                                                                    // width:'50px',
                                                                                    formatter: function (value, row, index) {
                                                                                        return row.num1 == null ? `<a style="color: #18a689" class=" " href="#" mce_href="#" title="录入" onclick="EntryScore(${JSON.stringify(row).replace(/\"/g, "'")})">录入</a>` :
                                                                                            `<a  style="color: #18a689" class=" " href="#" mce_href="#" title="修改" onclick="edit(${JSON.stringify(row).replace(/\"/g, "'")})">修改</a>`;
                                                                                    },
                                                                                    width: '230px'
                                                                                }
                                                                            ] :
                                                                            (
                                                                                ([[${page}]] == '实操月子中心场景导入二次加密信息') ?
                                                                                    [
                                                                                        {
                                                                                            field: 'num2',
                                                                                            title: '二次加密号',
                                                                                            width: '105px'
                                                                                        },
                                                                                        {
                                                                                            title: '操作',
                                                                                            field: 'id',
                                                                                            align: 'center',
                                                                                            // width:'50px',
                                                                                            formatter: function (value, row, index) {
                                                                                                return `          <a style="color: #18a689" class=" " href="#" mce_href="#" title="修改" onclick="edit(${JSON.stringify(row).replace(/\"/g, "'")})">修改</a>
                                                                          <a style="color: red" class=" " href="#" mce_href="#" title="删除" onclick="remove('${row.id}')">删除</a>`;
                                                                                            },
                                                                                            width: '230px'
                                                                                        }

                                                                                    ] :
                                                                                    (
                                                                                        ([[${page}]] == '实操月子中心场景选择二次加密录入分数') ?
                                                                                            [
                                                                                                {
                                                                                                    field: 'num2',
                                                                                                    title: '二次加密号',
                                                                                                    width: '105px'
                                                                                                },
                                                                                                {
                                                                                                    field: 'score1',
                                                                                                    title: '婴幼儿照护裁判一',
                                                                                                    width: '180px'
                                                                                                },
                                                                                                {
                                                                                                    field: 'score2',
                                                                                                    title: '婴幼儿照护裁判二',
                                                                                                    width: '180px'
                                                                                                },
                                                                                                {
                                                                                                    field: 'score3',
                                                                                                    title: '婴幼儿照护裁判三',
                                                                                                    width: '180px'
                                                                                                },
                                                                                                {
                                                                                                    field: 'score4',
                                                                                                    title: '婴幼儿照护裁判四',
                                                                                                    width: '180px'
                                                                                                },
                                                                                                {
                                                                                                    field: 'score5',
                                                                                                    title: '婴幼儿照护裁判五',
                                                                                                    width: '180px'
                                                                                                },
                                                                                                {
                                                                                                    field: 'score1s',
                                                                                                    title: '产妇照护裁判一',
                                                                                                    width: '180px'
                                                                                                },
                                                                                                {
                                                                                                    field: 'score2s',
                                                                                                    title: '产妇照护裁判二',
                                                                                                    width: '180px'
                                                                                                },
                                                                                                {
                                                                                                    field: 'score3s',
                                                                                                    title: '产妇照护裁判三',
                                                                                                    width: '180px'
                                                                                                },
                                                                                                {
                                                                                                    field: 'score4s',
                                                                                                    title: '产妇照护裁判四',
                                                                                                    width: '180px'
                                                                                                },
                                                                                                {
                                                                                                    field: 'score5s',
                                                                                                    title: '产妇照护裁判五',
                                                                                                    width: '180px'
                                                                                                },
                                                                                                {
                                                                                                    field: 'remarkA',
                                                                                                    title: '备注',
                                                                                                    width: '105px'
                                                                                                },
                                                                                                {
                                                                                                    title: '操作',
                                                                                                    field: 'id',
                                                                                                    align: 'center',
                                                                                                    // width:'50px',
                                                                                                    formatter: function (value, row, index) {
                                                                                                        return `
                                    <a style="color: #18a689" class=" " href="#" mce_href="#" title="修改" onclick="edit(${JSON.stringify(row).replace(/\"/g, "'")})">修改</a>
                                    `;
                                                                                                    },
                                                                                                    width: '230px'
                                                                                                }

                                                                                            ] :
                                                                                            (
                                                                                                ([[${page}]] == '实操月子中心场景导入一次加密信息') ?
                                                                                                    [
                                                                                                        {
                                                                                                            field: 'num1',
                                                                                                            title: '一次加密号',
                                                                                                            width: '105px'
                                                                                                        },
                                                                                                        {
                                                                                                            title: '操作',
                                                                                                            field: 'id',
                                                                                                            align: 'center',
                                                                                                            // width:'50px',
                                                                                                            formatter: function (value, row, index) {
                                                                                                                return `          <a style="color: #18a689" class=" " href="#" mce_href="#" title="修改" onclick="edit(${JSON.stringify(row).replace(/\"/g, "'")})">修改</a>
                                     <a style="color: red" class=" " href="#" mce_href="#" title="删除" onclick="remove('${row.id}')">删除</a>
                                    `;
                                                                                                            },
                                                                                                            width: '230px'
                                                                                                        }
                                                                                                    ] :
                                                                                                    (
                                                                                                        ([[${page}]] == '实操月子中心场景选择一次加密号与二次加密号') ?
                                                                                                            [
                                                                                                                {
                                                                                                                    field: 'num1s',
                                                                                                                    title: '一次加密号',
                                                                                                                    width: '105px'
                                                                                                                },
                                                                                                                {
                                                                                                                    field: 'num2s',
                                                                                                                    title: '二次加密号',
                                                                                                                    width: '105px'
                                                                                                                },
                                                                                                                {
                                                                                                                    title: '操作',
                                                                                                                    field: 'id',
                                                                                                                    align: 'center',
                                                                                                                    // width:'50px',
                                                                                                                    formatter: function (value, row, index) {
                                                                                                                        return `          <a style="color: #18a689" class=" " href="#" mce_href="#" title="修改" onclick="edit(${JSON.stringify(row).replace(/\"/g, "'")})">修改</a>
                                                                           `;
                                                                                                                    },
                                                                                                                    width: '230px'
                                                                                                                }

                                                                                                            ] :
                                                                                                            (
                                                                                                                ([[${page}]] == '实操月子中心场景根据选手信息选择一次加密') ?
                                                                                                                    [
                                                                                                                        {
                                                                                                                            field: 'recordNumber',
                                                                                                                            title: '检录序号',
                                                                                                                            width: '105px'
                                                                                                                        },
                                                                                                                        {
                                                                                                                            field: 'unitName',
                                                                                                                            title: '参赛单位',
                                                                                                                            width: '105px'
                                                                                                                        },
                                                                                                                        {
                                                                                                                            field: 'name',
                                                                                                                            title: '选手姓名',
                                                                                                                            width: '105px'
                                                                                                                        },
                                                                                                                        {
                                                                                                                            field: 'num1',
                                                                                                                            title: '一次加密号',
                                                                                                                            width: '105px'
                                                                                                                        },
                                                                                                                        {
                                                                                                                            title: '操作',
                                                                                                                            field: 'id',
                                                                                                                            align: 'center',
                                                                                                                            // width:'50px',
                                                                                                                            formatter: function (value, row, index) {
                                                                                                                                return row.num1 == null ? `<a style="color: #18a689" class=" " href="#" mce_href="#" title="录入" onclick="EntryScore(${JSON.stringify(row).replace(/\"/g, "'")})">录入</a>` :
                                                                                                                                    `<a style="color: #18a689" class=" " href="#" mce_href="#" title="修改" onclick="edit(${JSON.stringify(row).replace(/\"/g, "'")})">修改</a>`;
                                                                                                                            },
                                                                                                                            width: '230px'
                                                                                                                        }
                                                                                                                    ] :
                                                                                                                    (

                                                                                                                        ([[${page}]] == '职业素养测评导入一次加密信息') ?
                                                                                                                            [
                                                                                                                                {
                                                                                                                                    field: 'num1',
                                                                                                                                    title: '一次加密号',
                                                                                                                                    width: '105px'
                                                                                                                                },
                                                                                                                                {
                                                                                                                                    title: '操作',
                                                                                                                                    field: 'id',
                                                                                                                                    align: 'center',
                                                                                                                                    // width:'50px',
                                                                                                                                    formatter: function (value, row, index) {
                                                                                                                                        return `          <a style="color: #18a689" class=" " href="#" mce_href="#" title="修改" onclick="edit(${JSON.stringify(row).replace(/\"/g, "'")})">修改</a>
                                     <a style="color: red" class=" " href="#" mce_href="#" title="删除" onclick="remove('${row.id}')">删除</a>
                                    `;
                                                                                                                                    },
                                                                                                                                    width: '230px'
                                                                                                                                }
                                                                                                                            ] :
                                                                                                                            (
                                                                                                                                ([[${page}]] == '职业素养测评选择一次加密号与二次加密号') ?
                                                                                                                                    [
                                                                                                                                        {
                                                                                                                                            field: 'num1s',
                                                                                                                                            title: '一次加密号',
                                                                                                                                            width: '105px'
                                                                                                                                        },
                                                                                                                                        {
                                                                                                                                            field: 'num2s',
                                                                                                                                            title: '二次加密号',
                                                                                                                                            width: '105px'
                                                                                                                                        },
                                                                                                                                        {
                                                                                                                                            title: '操作',
                                                                                                                                            field: 'id',
                                                                                                                                            align: 'center',
                                                                                                                                            // width:'50px',
                                                                                                                                            formatter: function (value, row, index) {
                                                                                                                                                return `          <a style="color: #18a689" class=" " href="#" mce_href="#" title="修改" onclick="edit(${JSON.stringify(row).replace(/\"/g, "'")})">修改</a>`;
                                                                                                                                            },
                                                                                                                                            width: '230px'
                                                                                                                                        }
                                                                                                                                    ] :
                                                                                                                                    (
                                                                                                                                        ([[${page}]] == '职业素养测评根据选手信息选择一次加密') ?
                                                                                                                                            [
                                                                                                                                                {
                                                                                                                                                    field: 'recordNumber',
                                                                                                                                                    title: '检录序号',
                                                                                                                                                    width: '105px'
                                                                                                                                                },
                                                                                                                                                {
                                                                                                                                                    field: 'unitName',
                                                                                                                                                    title: '参赛单位',
                                                                                                                                                    width: '105px'
                                                                                                                                                },
                                                                                                                                                {
                                                                                                                                                    field: 'name',
                                                                                                                                                    title: '选手姓名',
                                                                                                                                                    width: '105px'
                                                                                                                                                },
                                                                                                                                                {
                                                                                                                                                    field: 'num1',
                                                                                                                                                    title: '一次加密号',
                                                                                                                                                    width: '105px'
                                                                                                                                                },
                                                                                                                                                {
                                                                                                                                                    title: '操作',
                                                                                                                                                    field: 'id',
                                                                                                                                                    align: 'center',
                                                                                                                                                    // width:'50px',
                                                                                                                                                    formatter: function (value, row, index) {
                                                                                                                                                        return row.num1 == null ? ` <a style="color: #18a689" class=" " href="#" mce_href="#" title="录入" onclick="EntryScore(${JSON.stringify(row).replace(/\"/g, "'")})">录入</a>` :
                                                                                                                                                            `<a style="color: #18a689" class=" " href="#" mce_href="#" title="修改" onclick="edit(${JSON.stringify(row).replace(/\"/g, "'")})">修改</a>`;
                                                                                                                                                    },
                                                                                                                                                    width: '230px'
                                                                                                                                                }
                                                                                                                                            ] :
                                                                                                                                            (
                                                                                                                                                ([[${page}]] == '成绩总解密') ?
                                                                                                                                                    [
                                                                                                                                                        {
                                                                                                                                                            field: 'unitName',
                                                                                                                                                            // title: '<span style="position: relative; top: 12px;    overflow: hidden;">参赛单位</span>'+'<br>'+'<span style="opacity: 0">xx</span>',
                                                                                                                                                            title: '<div style="height: 46px;line-height: 46px;">参赛单位</div>',
                                                                                                                                                            width: '105px',
                                                                                                                                                        },
                                                                                                                                                        {
                                                                                                                                                            field: 'teamLeader',
                                                                                                                                                            title: '领队',
                                                                                                                                                            width: '105px'
                                                                                                                                                        },
                                                                                                                                                        {
                                                                                                                                                            field: 'teacher',
                                                                                                                                                            title: '指导老师',
                                                                                                                                                            width: '105px'
                                                                                                                                                        },
                                                                                                                                                        {
                                                                                                                                                            field: 'recordNumber',
                                                                                                                                                            title: '检录序号',
                                                                                                                                                            width: '105px',
                                                                                                                                                        },
                                                                                                                                                        {
                                                                                                                                                            field: 'nameA1',
                                                                                                                                                            title: '选手姓名',
                                                                                                                                                            width: '105px'
                                                                                                                                                        },
                                                                                                                                                        {
                                                                                                                                                            field: 'num1A1',
                                                                                                                                                            title: '制定照护计划'+'<br>'+'一次加密',
                                                                                                                                                            width: '140px'
                                                                                                                                                        },
                                                                                                                                                        {
                                                                                                                                                            field: 'num2A1',
                                                                                                                                                            title: '制定照护计划'+'<br>'+'二次加密',
                                                                                                                                                            width: '140px'
                                                                                                                                                        },
                                                                                                                                                        {
                                                                                                                                                            field: 'scoreA1',
                                                                                                                                                            title: '制定照护计划'+'<br>'+'裁判打分',
                                                                                                                                                            width: '140px'
                                                                                                                                                        },
                                                                                                                                                        {
                                                                                                                                                            field: 'nameA2',
                                                                                                                                                            title: '选手姓名',
                                                                                                                                                            width: '105px'
                                                                                                                                                        },
                                                                                                                                                        {
                                                                                                                                                            field: 'num1A2',
                                                                                                                                                            title: '制定照护计划'+'<br>'+'一次加密',
                                                                                                                                                            width: '140px'
                                                                                                                                                        },
                                                                                                                                                        {
                                                                                                                                                            field: 'num2A2',
                                                                                                                                                            title: '制定照护计划'+'<br>'+'二次加密',
                                                                                                                                                            width: '140px'
                                                                                                                                                        },
                                                                                                                                                        {
                                                                                                                                                            field: 'scoreA2',
                                                                                                                                                            title: '制定照护计划'+'<br>'+'裁判打分',
                                                                                                                                                            width: '140px'
                                                                                                                                                        },
                                                                                                                                                        {
                                                                                                                                                            field: 'totalScoreA',
                                                                                                                                                            title: '制定照护计划'+'<br>'+'最终得分',
                                                                                                                                                            width: '140px'
                                                                                                                                                        },
                                                                                                                                                        {
                                                                                                                                                            field: 'nameC1',
                                                                                                                                                            title: '选手姓名',
                                                                                                                                                            width: '105px'
                                                                                                                                                        },
                                                                                                                                                        {
                                                                                                                                                            field: 'num1C1',
                                                                                                                                                            title: '职业素养'+'<br>'+'一次加密',
                                                                                                                                                            width: '140px'
                                                                                                                                                        },
                                                                                                                                                        {
                                                                                                                                                            field: 'num2C1',
                                                                                                                                                            title: '职业素养'+'<br>'+'二次加密',
                                                                                                                                                            width: '140px'
                                                                                                                                                        },
                                                                                                                                                        {
                                                                                                                                                            field: 'scoreC1',
                                                                                                                                                            title: '职业素养'+'<br>'+'赛场得分',
                                                                                                                                                            width: '140px'
                                                                                                                                                        },
                                                                                                                                                        {
                                                                                                                                                            field: 'nameC2',
                                                                                                                                                            title: '选手姓名',
                                                                                                                                                            width: '105px'
                                                                                                                                                        },
                                                                                                                                                        {
                                                                                                                                                            field: 'num1C2',
                                                                                                                                                            title: '职业素养'+'<br>'+'一次加密',
                                                                                                                                                            width: '140px'
                                                                                                                                                        },
                                                                                                                                                        {
                                                                                                                                                            field: 'num2C2',
                                                                                                                                                            title: '职业素养'+'<br>'+'二次加密',
                                                                                                                                                            width: '140px'
                                                                                                                                                        },
                                                                                                                                                        {
                                                                                                                                                            field: 'scoreC2',
                                                                                                                                                            title: '职业素养'+'<br>'+'赛场得分',
                                                                                                                                                            width: '140px'
                                                                                                                                                        },
                                                                                                                                                        {
                                                                                                                                                            field: 'totalScoreC',
                                                                                                                                                            title: '职业素养'+'<br>'+'最终得分',
                                                                                                                                                            width: '140px'
                                                                                                                                                        },
                                                                                                                                                        {
                                                                                                                                                            field: 'num1B1',
                                                                                                                                                            title: '居家场景'+'<br>'+'一次加密',
                                                                                                                                                            width: '140px'
                                                                                                                                                        },
                                                                                                                                                        {
                                                                                                                                                            field: 'num2B1',
                                                                                                                                                            title: '居家场景'+'<br>'+'二次加密',
                                                                                                                                                            width: '140px'
                                                                                                                                                        },
                                                                                                                                                        {
                                                                                                                                                            field: 'scoreB1One',
                                                                                                                                                            title: '居家场景'+'<br>'+'婴幼儿照护打分',
                                                                                                                                                            width: '140px'
                                                                                                                                                        },
                                                                                                                                                        {
                                                                                                                                                            field: 'scoreB1Two',
                                                                                                                                                            title: '居家场景'+'<br>'+'产妇照护打分',
                                                                                                                                                            width: '140px'
                                                                                                                                                        },
                                                                                                                                                        {
                                                                                                                                                            field: 'totalScoreB1',
                                                                                                                                                            title: '居家场景'+'<br>'+'最终得分',
                                                                                                                                                            width: '140px'
                                                                                                                                                        },
                                                                                                                                                        {
                                                                                                                                                            field: 'num1B2',
                                                                                                                                                            title: '月子场景'+'<br>'+'一次加密',
                                                                                                                                                            width: '140px'
                                                                                                                                                        },
                                                                                                                                                        {
                                                                                                                                                            field: 'num2B2',
                                                                                                                                                            title: '月子场景'+'<br>'+'二次加密',
                                                                                                                                                            width: '140px'
                                                                                                                                                        },
                                                                                                                                                        {
                                                                                                                                                            field: 'scoreB2One',
                                                                                                                                                            title: '月子场景'+'<br>'+'婴幼儿照护打分',
                                                                                                                                                            width: '140px'
                                                                                                                                                        },
                                                                                                                                                        {
                                                                                                                                                            field : 'scoreB2Two',
                                                                                                                                                            title : '月子场景'+'<br>'+'产妇照护打分',
                                                                                                                                                            width: '140px'
                                                                                                                                                        },
                                                                                                                                                        {
                                                                                                                                                            field : 'totalScoreB2',
                                                                                                                                                            title : '月子场景'+'<br>'+'最终得分',
                                                                                                                                                            width: '140px'
                                                                                                                                                        },
                                                                                                                                                        {
                                                                                                                                                            field : 'totalAverageScore',
                                                                                                                                                            title : '团队得分',
                                                                                                                                                            width: '105px'
                                                                                                                                                        }
                                                                                                                                                    ] :
                                                                                                                                                    (
                                                                                                                                                        ([[${page}]] == '职业素养测评机考分数') ?
                                                                                                                                                            [
                                                                                                                                                                {
                                                                                                                                                                    field: 'num2',
                                                                                                                                                                    title: '二次加密号',
                                                                                                                                                                    width: '105px'
                                                                                                                                                                },
                                                                                                                                                                {
                                                                                                                                                                    field: 'totalScore',
                                                                                                                                                                    title: '得分',
                                                                                                                                                                    width: '105px'
                                                                                                                                                                },

                                                                                                                                                            ] :
                                                                                                                                                            ([])
                                                                                                                                                    )
                                                                                                                                            )
                                                                                                                                    )
                                                                                                                            )


                                                                                                                    )
                                                                                                            )
                                                                                                    )
                                                                                            )
                                                                                    )
                                                                            )
                                                                    )
                                                            )
                                                    )
                                            )

                                    )
                            )
                    )
            )
        columns.forEach(item => {
            item.align = 'center'
            item.valign='middle'
        })

        function load() {
            $('#exampleTable')
                .bootstrapTable(
                    {
                        method: [[${apiMethod}]], // 服务器数据的请求方式 get or post
                        url: [[${api}]], // 服务器数据的加载地址
                        iconSize: 'outline',
                        toolbar: '#exampleToolbar',
                        striped: true, // 设置为true会有隔行变色效果
                        dataType: "json", // 服务器返回的数据类型
                        pagination: true, // 设置为true会在底部显示分页条
                        singleSelect: false, // 设置为true将禁止多选
                        // contentType : "application/x-www-form-urlencoded",
                        // //发送到服务器的数据编码类型
                        pageSize: 10, // 如果设置了分页，每页数据条数
                        pageNumber: 1, // 如果设置了分布，首页页码
                        //search : true, // 是否显示搜索框
                        showColumns: false, // 是否显示内容下拉框（选择显示的列）
                        sidePagination: "server", // 设置在哪里进行分页，可选值为"client" 或者 "server"
                        queryParamsType: "",
                        fixedColumns: ([[${page}]] == '成绩总解密'),
                        fixedNumber: 3,
                        queryParams: function (params) {
                            console.log('params', params)
                            return {
                                current: params.pageNumber,
                                size: params.pageSize,
                                ...[[${apiData}]]
                            };
                        },
                        responseHandler: function (res) {
                            if (res.code !== '0') {
                                layer.msg(res.msg);
                                return false
                            }
                            return {
                                "rows": res.data.records,
                                ...res.data
                            };
                        },
                        columns
                    });
        }
    </script>

</div>

</body>
</html>
